package com.linkhub.oms.admin.modules.pickuporder.domain.vo;

import com.linkhub.oms.entity.EntryOrderLineEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * 提货商品信息表
 * </p>
 *
 * @author echo
 * @since 2024-05-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "EntryOrderLineVO", description = "提货商品信息表")
public class EntryOrderLineVO implements Serializable {

    @ApiModelProperty(value = "本地商品skuId")
    private String skuId;

    @ApiModelProperty("sku")
    private String sku;

    @ApiModelProperty(value = "数量")
    private Integer skuQuantity;

    public static EntryOrderLineVO convert(EntryOrderLineEntity orderLine) {
        EntryOrderLineVO vo = new EntryOrderLineVO();
        vo.setSkuId(orderLine.getSkuId());
        vo.setSku(orderLine.getSku());
        vo.setSkuQuantity(orderLine.getSkuQuantity());

        return vo;
    }
}
